<?xml version="1.0" encoding="utf-8"?>
<%@ page contentType="application/xhtml+xml;charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Trinity</title>
        <link rel="stylesheet" href="/TrinityStripes/style.css" type="text/css"/>
    </head>
    <body>
        <p>Logged user: <strong>${sessionScope['user']}</strong></p>
        <jsp:include page="/HidPages/header.jsp"/>

        <c:if test="${not empty error}">
            <div id="error">
                <p>${error}</p>
            </div>
        </c:if>

        <c:if test="${not empty notice}">
            <div id="notice">
                <p>${notice}</p>
            </div>
        </c:if>

        <!--
        <div class="test">
            ${wholeDay}<br/>
            ${action}|${error!=null}|${notice!=null}|${eventList!=null}|${recurrence}
        </div>
        -->

        <c:if test="${action=='add'}">
            <div class="addEventInputPage">
                <jsp:include page="/HidPages/addEvent.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='addDataConfirm'}">
            <div class="addEventConfirmationPage">
                <jsp:include page="/HidPages/addEventConfirmPage.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='edit'}">
            <div class="editEventUidPage">
                <jsp:include page="/HidPages/editEventUidInput.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='editEvent'}">
            <div class="editEventInputPage">
                <jsp:include page="/HidPages/editEvent.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='editEventConfirm'}">
            <div class="editEventConfirmationPage">
                <jsp:include page="/HidPages/editEventConfirm.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='remove'}">
            <div class="removeEventUidPage">
                <jsp:include page="/HidPages/removeEventUidInput.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='removeEventConfirm'}">
            <div class="removeEventConfirmationPage">
                <jsp:include page="/HidPages/removeEventConfirm.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='load' && not empty eventList}">
            <div class="loadEventsPage">
                <jsp:include page="/HidPages/loadEvents.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='calendarOptions'}">
            <div class="calendarView">
                <jsp:include page="/HidPages/calendarOptions.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='yearlyView' || action=='monthlyView' || action=='weeklyView' || action=='dailyView'}">
            <div class="calendarView">
                <jsp:include page="//HidPages/calendarOptions.jsp"/>
            </div>
        </c:if>

        <c:if test="${action=='calendarYearView'}">
            <div class="calendarView">
                <jsp:include page="/HidPages/calendarYearView.jsp"/>
            </div>
        </c:if>
        
        <c:if test="${action=='calendarMonthView'}">
            <div class="calendarView">
                <jsp:include page="/HidPages/calendarMonthView.jsp"/>
            </div>
        </c:if>
        
        <c:if test="${action=='calendarWeekView'}">
            <div class="calendarView">
                <jsp:include page="/HidPages/calendarWeekView.jsp"/>
            </div>
        </c:if>
        
        <c:if test="${action=='calendarDayView'}">
            <div class="calendarView">
                <jsp:include page="/HidPages/calendarDayView.jsp"/>
            </div>
        </c:if>
    </body>
</html>